package com.ny.wlw;

public class WeChatPay implements Pay{
    private double balance = 100; // 初始余额设为100

    @Override
    public void pay(double money) {
        if (balance >= money) {
            System.out.println("微信支付" + money + "元");
            balance -= money;
            System.out.println("你的微信余额为：" + balance);
        } else {
            System.out.println("你的微信余额不足");
        }
    }

}
